import request from '@/utils/request'

/**
 * 分页查询
 * @param params
 * @returns {*}
 */
export function queryAllByPager(params) {
  return request({
    url: 'rest/api/temp/v1/type/child/pager',
    method: 'get',
    params
  })
}

/**
 * 查询单个对象
 * @param params
 * @returns {*}
 */
export function queryOne(params) {
  return request({
    url: 'rest/api/temp/v1/type/child/one',
    method: 'get',
    params
  })
}

export function saveObject(data) {
  return request({
    url: 'rest/api/temp/v1/type/child/save/entity',
    method: 'post',
    data
  })
}

export function updateObject(data) {
  return request({
    url: 'rest/api/temp/v1/type/child/update/entity',
    method: 'post',
    data
  })
}

/**
 * 删除
 * @param data
 * @returns {*}
 */
export function deleteObject(data) {
  return request({
    url: 'rest/api/temp/v1/type/child/del',
    method: 'post',
    data
  })
}

export function queryAllByParent(params) {
  return request({
    url: 'rest/api/temp/v1/type/child/parent',
    method: 'get',
    params
  })
}

export function queryAllBlurry() {
  return request({
    url: 'rest/api/temp/v1/type/child/blurry',
    method: 'get'
  })
}
